package org.andao.security.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.andao.core.base.model.RootModel;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;


/**
 * 组织扩展表.
*
 * @author 广州视睿电子科技有限公司 | 胡志国(huzhiguo@cvte.cn)
 * @build 2013-6-21下午3:54:29
 */
@Entity
@Table(name = "seewo_sys_unitextend")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class OrgUnitExtends extends RootModel {

	private static final long serialVersionUID = -4488104211514929232L;

	@Column(name="EXCODE")
	private String exCode;//扩展键
	
	@Column(name="EXVALUE")
	private String exValue;//扩展值
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "UNITID")
	private OrgUnit orgUnit;//所属组织

	public OrgUnitExtends(){}
	
	public OrgUnitExtends(String exCode,String exValue,OrgUnit orgUnit){
		this.exCode = exCode;
		this.exValue = exValue;
		this.orgUnit = orgUnit;
	}
	
	/**
	 * @return the exCode
	 */
	public String getExCode() {
		return exCode;
	}

	/**
	 * @param exCode the exCode to set
	 */
	public void setExCode(String exCode) {
		this.exCode = exCode;
	}

	/**
	 * @return the exValue
	 */
	public String getExValue() {
		return exValue;
	}

	/**
	 * @param exValue the exValue to set
	 */
	public void setExValue(String exValue) {
		this.exValue = exValue;
	}

	/**
	 * @return the orgUnit
	 */
	public OrgUnit getOrgUnit() {
		return orgUnit;
	}

	/**
	 * @param orgUnit the orgUnit to set
	 */
	public void setOrgUnit(OrgUnit orgUnit) {
		this.orgUnit = orgUnit;
	}
	
	
	
	
}
